﻿@model ESN.Models.CanvasSession

@{
    ViewBag.Title = "Canvas";
}

<h2>@ESN.Languages.LangString.Load("title", "Canvas")</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("NewCanvas", "Canvas")) {
    @Html.ValidationSummary(true)
        <div class="editor-label">
            @ESN.Languages.LangString.Load("name", "Canvas")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Title)
            @Html.ValidationMessageFor(model => model.Title)
        </div>

        <div class="editor-label">
            @ESN.Languages.LangString.Load("readonly", "Canvas")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.readOnly)
            @Html.ValidationMessageFor(model => model.readOnly)
        </div>

        <div class="editor-label">
            @ESN.Languages.LangString.Load("chat", "Canvas")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.allowChat)
            @Html.ValidationMessageFor(model => model.allowChat)
        </div>

        <div class="editor-label">
            @ESN.Languages.LangString.Load("public", "Canvas")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.isPublic)
            @Html.ValidationMessageFor(model => model.isPublic)
        </div>

        <input data-val="true" data-val-required="The UserId field is required." id="UserId" name="UserId" type="hidden" value="@ViewBag.UserId" />
        <p>
            <input type="submit" value="@ESN.Languages.LangString.Load("create", "Canvas")" />
        </p>
}
